
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObject;
using DataAccessLayer;

namespace BusinessLogic
{
    /// <summary>
    /// Define ChiTietPhieuNhapHangUtil class. This class user for BussinessLayer.

    /// </summary>
    public class ChiTietPhieuNhapHangUtil
    {
        /// <summary>
        /// Define function Insert for ChiTietPhieuNhapHang Object.
        /// </summary>
        /// <param name="t">object data need Insert.</param>
        /// <returns>
        ///    True: if insert successfull.
        ///    False: if insert error.
        ///</returns>
        public static bool Insert(ChiTietPhieuNhapHang t)
        {

            return ChiTietPhieuNhapHangDao.Insert(t);
        }
        /// <summary>
        /// Define function Update for ChiTietPhieuNhapHang Object.
        /// </summary>
        /// <param name="t">project data need updated.</param>
        /// <returns>
        ///    True: if update successful.
        ///    False: if update Error.
        ///</returns>
        public static bool Update(ChiTietPhieuNhapHang t)
        {

            return ChiTietPhieuNhapHangDao.Update(t);
        }
        /// <summary>
        /// Get All ChiTietPhieuNhapHang object from table ChiTietPhieuNhapHang.
        /// </summary>
        /// <returns>List ChiTietPhieuNhapHang object.</returns>
        public static List<ChiTietPhieuNhapHangResult> GetAll()
        {
            return ChiTietPhieuNhapHangDao.GetAll();
        }
        /// <summary>
        /// Search ChiTietPhieuNhapHang object in table ChiTietPhieuNhapHang.
        /// </summary>
        /// <param name="t">Condition for Search.</param>

        /// <returns>List ChiTietPhieuNhapHangResult objects.</returns>

        public static List<ChiTietPhieuNhapHangResult> SearchChiTietPhieuNhapHangSomeCondition(ChiTietPhieuNhapHang t)
        {
            return ChiTietPhieuNhapHangDao.SearchChiTietPhieuNhapHangSomeCondition(t);
        }
        /// <summary>
        /// Get a ChiTietPhieuNhapHang data object by primary key. 
        /// </summary>
        /// <param name="maPhieuNhapHang" >This is primary key.</param>
        /// <param name="maMatHang" >This is primary key.</param>
        /// <returns>A ChiTietPhieuNhapHang object.</returns>

        public static ChiTietPhieuNhapHang Get(Int64 maPhieuNhapHang, string maMatHang)
        {
            return ChiTietPhieuNhapHangDao.Get(maPhieuNhapHang, maMatHang);
        }
        /// <summary>
        /// This function to Delete ChiTietPhieuNhapHang object by primary key.
        /// </summary>
        /// <param name="maPhieuNhapHang" >This is primary key.</param>
        /// <param name="maMatHang" >This is primary key.</param>
        /// <returns>If succesful return True else  return False.</returns>

        public static bool Delete(Int64 maPhieuNhapHang, string maMatHang)
        {

            return ChiTietPhieuNhapHangDao.Delete(maPhieuNhapHang, maMatHang);
        }
        public static List<ChiTietPhieuNhapHangResult> GetByMaPhieuNhapHang(Int64 maPhieuNhaphang)
        {
            return ChiTietPhieuNhapHangDao.GetByMaPhieuNhapHang(maPhieuNhaphang);
        }
        public static List<ChiTietPhieuNhapHangDetail> GetChiTietPhieuNhapHangDetailByMaPhieuNhapHang(Int64 maPhieuNhaphang)
        {
            return ChiTietPhieuNhapHangDao.GetChiTietPhieuNhapHangDetailByMaPhieuNhapHang(maPhieuNhaphang);
        }
    }
}